summaryrefslogtreecommitdiff
path: root/src/lexer.h
blob: 4e6d73d48ef7d37c40c95b5a17d76f607f1db75c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef LEXER_H
#define LEXER_H

#include <bu/stream.h>

class Token;

class Lexer
{
public:
    Lexer( Bu::Stream &rIn );
    virtual ~Lexer();

    Token nextToken();

    int getScale() const { return iScale; }
    void setScale( int i ) { iScale = i; }

    int getRadix() const { return iRadix; }
    void setRadix( int i );

private:
    Bu::Stream &rIn;
    Bu::String sBuf;
    int iBufPos;
    int iScale;
    int iRadix;
    char numRangeTop;
    char ascRangeTop;
};

#endif